<!DOCTYPE html>
<html>
	<head>
		<title>当日测算查询</title>
		<meta http-equiv="Pragma" CONTENT="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">
		<%include("/common/include.html"){}%>
	</head>
	<link rel="stylesheet" href="${cxt!}/sb/plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<script type="text/javascript">
		$(function() {
			var $form_div = $("#queryByCustom div");
			winResize($form_div);
			$(window).resize(function(){//当调整浏览器窗口的大小时，发生 resize 事件
				winResize($form_div);
			});
		})
		
		function btn1(phone){
			loadDialog($('#datagrid'),null, '回访', 'scallVisit/showscallVisit?phone='+phone);
		};
		
		function btn2(phone){
			loadDialog($('#datagrid'),null, '查询', 'scallVisit/queryByCallVisit?phone='+phone);
		};
		
		$(document).ready(function () {		
			var todaydate = '${todaydate!}';
			$('#datagrid').datagrid({
				queryParams: {
					'todaydate': todaydate
				},
				singleSelect: true,
				url:'${cxt!}/measurement/todaymeasure',
				fitColumns:true,
				collapsible: true,
				columns:[[
					{field:'name',title:'姓名',width:35,align:'center'},
					{field:'phone',title:'手机',width:90,align:'center'},
					{field:'age',title:'年龄',width:50,align:'center'},
					{field:'sex',title:'性别',width:50,align:'center'},
					{field:'treatment',title:'疗程数',width:50,align:'center'},
					{field:'YNContent',title:'操作',width:100,align:'center',
					formatter:function(value,row,index){
						return '<a onclick='+'btn1(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>回访</span></span></a>'
						+'<a onclick='+'btn2(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:green'+' class='+'l-btn-text'+'>查询</span></span></a>';
					}},
					]]
			});	
		})
	</script>
	<body class="easyui-layout">
		<div data-options="region:'center'" style="overflow-x:hidden;">
			<table id="datagrid" style="width: 100%; height: 100%;"></table> 
		</div>
	</body>
</html>
